﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Web;

/// <summary>
/// Class1 的摘要描述
/// </summary>

[System.ComponentModel.DataObjectAttribute(true)]
public partial class BLL_ManageOrganization
{
    public BLL_ManageOrganization()
    {
        //
        // TODO: 在此加入建構函式的程式碼
        //
    }

    //SELECT
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Select)]
    public DataTable BLL_Select(int OrganizationID)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.ManageOrganization_Select(OrganizationID);
    }

    //Insert
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Insert)]
    public int BLL_Insert(string OrganizationName, int Parent, string Internal, string Active)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.ManageOrganization_Insert( OrganizationName, Parent, Internal, Active);
    }

    //Update
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Update)]
    public int BLL_Update(int original_OrganizationID, string OrganizationName, string Internal, string Active)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.ManageOrganization_Update(original_OrganizationID, OrganizationName, Internal, Active);
    }

    //DisableEnable
    [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Delete)]
    public Int32 BLL_Delete(int OrganizationID, string Active)
    {
        clsDBUtility dbUtil = clsDBUtility.GetInstance();
        return dbUtil.ManageOrganization_DisableEnable(OrganizationID, Active);
    }

}
